<%--
    Document   : popuptemplate
    Created on : Jun 4, 2012, 2:47:19 PM
    Author     : ems
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@taglib prefix="rich" uri="http://richfaces.org/rich" %>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j" %>
<html>
    <head>
        <link rel="stylesheet" type="text/css" href="../css/popup.css"/>
        <link rel="stylesheet" type="text/css" href="../css/kapiform.css"/>
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/jq.date.js"></script>  
        <link rel="stylesheet" type="text/css" href="../css/ui.datepicker.css"/>
        <script type="text/javascript">
            var open_cur = 0;
      
            $j = jQuery.noConflict();
            $j(document).ready(function(){
                  validateform("formKH");
                $j('input#leavedate1').datepicker({ dateFormat: 'dd/mm/yy', showOn: 'button', buttonImage: '../images/calenda_icon.gif', buttonImageOnly: true });
                $j('.item_head_care').live('click',function(){
                    $j('.item_content_care').slideUp();
                    if($j(this).next().hasClass('active')){

                        $j('.item_content_care').removeClass('active');
                    }else{

                        $j('.item_content_care').removeClass('active');
                        $j(this).next().addClass('active');
                        $j(this).next().slideDown();
                    }
                });
              
                
               
                $j("#fancybox-close").live("click",function(){
                    window.location = "customer.jsp";
                });
                $j(".savewait").live("click",function(){
                    if($j(".alert").text()==""){
                     showPleaseWait();   
                    }
                     
                });
               
            });

        </script>
        <style type="text/css">
            #ui-datepicker-div
            {
                z-index: 9999999;
            }
            div.item_content_care,div.item_head_care
            {
                margin:0px;
                padding:5px;
                text-align:left;
                background:#D4D7D8;
                border:solid 1px #c3c3c3;


            }
            div.item_head_care{
                cursor: pointer;
                float: left;
                font-size: 14px;
                margin-left: 35px;
                margin-top: 6px;
                width: 91%;
            }
            div.item_line{
                height: 3px;
                width: 100%;
            }
            div.item_content_care
            {
                background: none repeat scroll 0 0 #E5E8EA;
                display: none;
                float: left;
                height: auto;
                margin-left: 35px;
                width: 91%;
            }
            div.chare_content{
                float:left;
                width:98%;
                height: auto;

            }
            .chare_content .chare_content_head{
                background:#586C7F; 
                float:left;
                height: 12px;
                padding:8px;
                width:100%;

            }
            .chare_content .chare_content_head span{
                font-size: 12px;
                color:#fff;


                text-transform: uppercase;
            }

            .item_work_content .item_work_content_row_content{
                width: 97%;
            }
            .item_work_content .item_work_content_row_head{
                width: 97%;
            }
            .row1{
                width:345px;
            }
            div.rateit {
                -moz-user-select: none;
                display: inline-block;
                position: relative;
            }
            div.rateit div.rateit-reset {

                width:0px !important;
            }
            .mesage{
                color: red;
                float: left;
                margin-left: 252px;
                margin-top: 20px;
                text-transform: uppercase;

            }
            .popup-footer .buttonsave{
                margin-top:0px !important;
            }



        </style>
    </head>



    <f:view>

        <body style=" float:left; width:auto; height:auto; margin:0px;">
            <f:loadBundle basename="#{environmentSession.localizationSource}" var="locale"/>


            <div class="popup" style="height:autopx; width:760px">
                <div class="popup-header">
                    <div class="title"><h:outputText value="#{locale.customer_company_add}"/></div>

                </div>
                <div class="popup-content" >

                    <div class="chare_content">    
                        <%-- thong tin co ban--%>
                        <a4j:form id="formKH">
                            <div class="item_head_care" >
                                <h:outputText value="Thông tin cơ bản"></h:outputText>
                                </div>

                                <div class="item_content_care" style="display:block;">                               
                                    <div class="item_work_content">
                                        <div class="form-left">
                                            <div class="fields_input">
                                                <label><h:outputText value="#{locale.title}"/></label>
                                            <h:selectOneMenu value="#{CustomerBean.nv108}">  
                                                <f:selectItems value="#{CustomerBean.selectItems}" />  
                                            </h:selectOneMenu>

                                        </div>
                                        <div class="fields_input">
                                            <label><h:outputText value="#{locale.fname}"/>*:</label>&nbsp;
                                            <h:inputText value="#{CustomerBean.nv102}" id="firstname" styleClass="required ">                                      
                                            </h:inputText>

                                        </div>
                                        <div class="fields_input">
                                            <label><h:outputText value="Chữ lót"/>*:</label>&nbsp;
                                            <h:inputText value="#{CustomerBean.nv127}"  styleClass="required ">                                      
                                            </h:inputText>

                                        </div>
                                        <div class="fields_input">
                                            <label><h:outputText value="#{locale.lname}"/>*:</label>&nbsp;                                     
                                            <h:inputText value="#{CustomerBean.nv103}" id="lastname" lang="firstname" styleClass="required"></h:inputText>
                                            </div>
                                            <div class="fields_input">
                                                <label> <h:outputText value="#{locale.sex}"/>*:</label>
                                            <h:selectOneRadio value="#{CustomerBean.nv107}" styleClass="feild_sex"  style="width:100px;"   >
                                                <f:selectItem itemValue="M" itemLabel="#{locale.employeeSexMale}" />
                                                <f:selectItem itemValue="F" itemLabel="#{locale.employeeSexFmale}"/>                                                     
                                            </h:selectOneRadio>
                                        </div>
                                        <div class="fields_input">                                       
                                            <label><h:outputText value="#{locale.dateBorn}"/>*:</label>&nbsp;
                                            <input type="text" id="leavedate1" name="leavedate1"  class="input_fields required date"  
                                                   value="<h:outputText value="#{CustomerBean.nd118}"> <f:convertDateTime pattern="dd/MM/yyyy"/></h:outputText>"/>

                                            </div>
                                            <div class="fields_input">
                                                <label> <h:outputText value="#{locale.customertype}"/>:</label>
                                            <h:selectOneRadio value="#{CustomerBean.ni104}" styleClass="select_cus" id="select_cus_ck"  >
                                                <f:selectItem  itemValue="1" itemLabel="#{locale.normalcustomer}"/> 
                                                <f:selectItem id="tn" itemValue="0" itemLabel="#{locale.hiddencustomer}"  />
                                            </h:selectOneRadio>
                                        </div>
                                    </div>
                                    <div class="form-right">

                                        <div class="fields_input">
                                            <label><h:outputText value="#{locale.status_marries}"/>:</label>
                                            <h:selectOneMenu value="#{CustomerBean.nv109}"  >                                           
                                                <f:selectItem itemLabel="#{locale.status_family_true}" itemValue="1" />
                                                <f:selectItem itemLabel="#{locale.status_family_false}" itemValue="2" />
                                                <f:selectItem itemLabel="#{locale.status_family_orther}" itemValue="3" />
                                            </h:selectOneMenu>
                                        </div>
                                        <div class="fields_input">
                                            <label><h:outputText value="#{locale.career}"/>:</label>
                                            <h:selectOneMenu  value="#{CustomerBean.fn550}" >  
                                                <f:selectItems value="#{CustomerBean.listSelectItems}" />                                            
                                            </h:selectOneMenu>
                                        </div> 
                                        <div class="fields_input">
                                            <label><h:outputText value="#{locale.department}"/>:</label>&nbsp;
                                            <h:inputText value="#{CustomerBean.nv110}" />    
                                        </div> 
                                        <div class="fields_input">
                                            <label><h:outputText value="#{locale.position}"/>:</label>&nbsp;
                                            <h:inputText value="#{CustomerBean.nv111}" />    
                                        </div> 
                                        <div class="fields_input  <h:outputText value='#{CustomerBean.fn850gt}'/>">
                                            <label><h:outputText value="#{locale.department}"/>:</label>
                                            <h:selectOneMenu   id="cmbNv113" value="#{CustomerBean.fn850gt}"  valueChangeListener="#{CustomerBean.changeCombN850forN900}">
                                                <f:selectItems value="#{CustomerBean.selectCombN850}" />
                                                <a4j:support event="onchange" reRender="nv112" />
                                            </h:selectOneMenu>
                                        </div>

                                        <div class="fields_input <h:outputText value='#{CustomerBean.nv112}'/>">
                                            <label><h:outputText value="#{locale.emp_intro}"/>:</label>&nbsp;
                                            <h:selectOneMenu id="nv112" value="#{CustomerBean.nv112}">
                                                <f:selectItems value="#{CustomerBean.selectItemN900}"></f:selectItems>
                                            </h:selectOneMenu>
                                        </div>
                                    </div>
                                    <div class="popup-footer">
                                       
                                        <h:inputHidden id="FFN600" value="#{CustomerBean.FN600}" />
                                        <h:inputHidden id="FK100" value="#{CustomerBean.fk100}" /> 
                                        <h:outputText value="#{CustomerBean.message}" id="mesage" styleClass="mesage"/>
                                        <a4j:commandButton  action="#{CustomerBean.saveCustomer}"  oncomplete="hidePleaseWait();"  styleClass="buttonsave savewait" value="#{locale.save}" reRender="mesage,pn100">
                                           
                                        </a4j:commandButton>
                                        <h:inputHidden value="#{CustomerBean.flag}" id="flag" />
                                        <h:inputHidden value="#{CustomerBean.pn100}" id="pn100" />
                                        <h:inputHidden value="#{CustomerBean.editpage}" id="editpage"/>
                                        <%--<h:inputHidden value="#{CustomerBean.sendPage}" id="sendPage" />--%>
                                        <h:inputHidden value="#{CustomerBean.fn850}" id="fn850" />
                                        <h:inputHidden value="#{CustomerBean.nv113}" id="nv113" />                                       
                                        <h:inputHidden value="#{CustomerBean.ni105}" id="ni105" />
                                        <h:inputHidden value="#{CustomerBean.nn117}" id="nn117" />


                                    </div>
                                </div>
                            </div>
                        </a4j:form>
                        <%-- thong tin co ban--%>
                        <%-- thong tin co ban--%>
                        <div class="item_head_care contact">
                            <h:outputText value="Thông tin liên lạc"></h:outputText>
                            </div>

                            <div class="item_content_care">                               
                                <div class="item_work_content contact_content">

                                </div>
                            </div>
                        <%-- thong tin co ban--%>
                        <%-- thong tin co ban--%>
                        <div class="item_head_care passportss">
                            <h:outputText value="CMNN/PASSPORT"></h:outputText>
                            </div>

                            <div class="item_content_care">                               
                                <div class="item_work_content passport_contentss">

                                </div>
                            </div>
                        <%-- thong tin co ban--%>
                        <%-- thong tin co ban--%>
                        <div class="item_head_care account">
                            <h:outputText value="Thông tin tài khoản"></h:outputText>
                            </div>

                            <div class="item_content_care">                               
                                <div class="item_work_content account_content">

                                </div>
                            </div>
                        <%-- thong tin co ban--%>

                        <div class="item_line"></div>

                    </div>

                </div>


                <div class="popup-footer">
                    <div class="buttonsave close111" style="margin-right: 35px;" onclick="closeform();"  ><span><h:outputText value="#{locale.button_close}"/></span></div>
                </div>            


            </div>
        </body>

    </f:view>
</html>
<script type="text/javascript">
    $j(document).ready(function(){
        yhight = ($j('.popup').height()-90)+"px" ;
        $j('.main_content').css('height',yhight );
        $j('.popup-content').css('height',yhight );
    });
    function closeform(){
        window.location = "customer.jsp";
    }
</script>